<?php 
session_start();          
	require_once "../includes/config.php";
	
	$classified=$_REQUEST['classified'];
	$sqlSelMsg="select * from tbl_post where post_id=$classified";
	$rstSelMsg=mysql_query($sqlSelMsg);
	$rowSelMsg=mysql_fetch_array($rstSelMsg);
	
    $post_name=stripslashes($rowSelMsg['post_name']);
    $post_description=stripslashes($rowSelMsg['post_description']);
    $post_location=stripslashes($rowSelMsg['post_location']);
    $bedroom=stripslashes($rowSelMsg['bedroom']);
    $bathroom=stripslashes($rowSelMsg['bathroom']);
    $price=stripslashes($rowSelMsg['price']);
    $post_date=$rowSelMsg['posted_date'];
	$post_sqrt=stripslashes($rowSelMsg['post_sqrt']);
	$post_yearbuild=stripslashes($rowSelMsg['post_yearbuild']);
	$post_property=stripslashes($rowSelMsg['post_property']);
	$post_company=stripslashes($rowSelMsg['post_company']);
	$post_education=stripslashes($rowSelMsg['education']);
	$post_contact=stripslashes($rowSelMsg['post_contact']);
	$post_phone=stripslashes($rowSelMsg['post_phone']);
	$post_email=stripslashes($rowSelMsg['post_email']);
	$post_image_sample=$rowSelMsg['post_image_sample'];
    $selCat=mysql_query("select * from tbl_category where category_id='".$rowSelMsg['category_id']."'");
    $rowCat=mysql_fetch_array($selCat);
    $selSubcat=mysql_query("select * from tbl_category where category_id='".$rowSelMsg['subcategory_id']."'");
    $rowSubcat=mysql_fetch_array($selSubcat);
    $category_name=$rowCat['category_name'];
    $sub_category_name=$rowSubcat['category_name'];
	
    $selProduct=mysql_query("select * from tbl_product where product_id='".$rowSelMsg['productid']."'");
    $rowProduct=mysql_fetch_array($selProduct);
	$productname=$rowProduct['product_name'];
	
    $selUsers=mysql_query("select * from tbl_users where user_id='".$rowSelMsg['posted_by']."'");
    $rowUsers=mysql_fetch_array($selUsers);
	$posted_by=$rowUsers['first_name']." ".$rowUsers['last_name'];
?>
<style type="text/css">
	table#tbl-profile tr td { vertical-align:middle; }
</style>
<table width="100%" height="611"  border="1" cellspacing="0" class='container'>
  <tr>
  	<td height="26" class="tdHeader">View Classified </td>
  </tr>
  <tr>
    <td><table id="tbl-profile" width="80%" align="center"  border="0" cellspacing="0" cellpadding="0">
      
	  	  
      <tr>
        <td width="37" bgcolor="#FBF1F1">&nbsp;</td>
        <td width="215" height="33" bgcolor="#FBF1F1">Name </td>
        <td width="380" height="33" bgcolor="#FBF1F1"><?php echo $post_name; ?></td>
      </tr>
      
      <tr>
        <td width="37" >&nbsp;</td>
        <td width="215" height="33">Category  </td>
        <td width="380" height="33"><?php echo $category_name; ?></td>
      </tr>
      
      <tr>
        <td width="37" bgcolor="#FBF1F1">&nbsp;</td>
        <td width="215" height="33" bgcolor="#FBF1F1">Subcategory</td>
        <td width="380" height="33" bgcolor="#FBF1F1"><?php echo $sub_category_name; ?></td>
      </tr>
      
      <tr>
        <td width="37" >&nbsp;</td>
        <td width="215" height="33">Description</td>
        <td width="380" height="33"><?php echo $post_description; ?></td>
      </tr>
      
      <tr>
        <td width="37" bgcolor="#FBF1F1">&nbsp;</td>
        <td width="215" height="33" bgcolor="#FBF1F1">Location</td>
        <td width="380" height="33" bgcolor="#FBF1F1"><?php echo $post_location; ?></td>
      </tr>
	  
      <tr>
        <td width="37" >&nbsp;</td>
        <td width="215" height="33">Bedrooms</td>
        <td width="380" height="33"><?php echo $bedroom; ?></td>
      </tr>
	  
      <tr>
        <td width="37" bgcolor="#FBF1F1">&nbsp;</td>
        <td width="215" height="33" bgcolor="#FBF1F1">Bathrooms</td>
        <td width="380" height="33" bgcolor="#FBF1F1"><?php echo $bathroom; ?></td>
      </tr>
      
      <tr>
        <td width="37" >&nbsp;</td>
        <td width="215" height="33">Price</td>
        <td width="380" height="33"><?php echo $price; ?></td>
      </tr>
	  
      <tr>
        <td width="37" bgcolor="#FBF1F1">&nbsp;</td>
        <td width="215" height="33" bgcolor="#FBF1F1">SQ Ft</td>
        <td width="380" height="33" bgcolor="#FBF1F1"><?php echo $post_sqrt; ?></td>
      </tr>
	  
      <tr>
        <td width="37" >&nbsp;</td>
        <td width="215" height="33">Year Built</td>
        <td width="380" height="33"><?php echo $post_yearbuild; ?></td>
      </tr>
	  
      <tr>
        <td width="37" bgcolor="#FBF1F1">&nbsp;</td>
        <td width="215" height="33" bgcolor="#FBF1F1">Property Type</td>
        <td width="380" height="33" bgcolor="#FBF1F1"><?php echo $post_property; ?></td>
      </tr>
	  
      <tr>
        <td width="37" >&nbsp;</td>
        <td width="215" height="33">Photo</td>
        <td width="380" height="33"><img src="../<?php echo $post_image_sample; ?>" border="0"></td>
      </tr>
	  
      <tr>
        <td width="37" bgcolor="#FBF1F1">&nbsp;</td>
        <td width="215" height="33" bgcolor="#FBF1F1">Company</td>
        <td width="380" height="33" bgcolor="#FBF1F1"><?php echo $post_company; ?></td>
      </tr>
	  
      <tr>
        <td width="37" >&nbsp;</td>
        <td width="215" height="33">Education</td>
        <td width="380" height="33"><?php echo $post_education; ?></td>
      </tr>
	  
      <tr>
        <td width="37" bgcolor="#FBF1F1">&nbsp;</td>
        <td width="215" height="33" bgcolor="#FBF1F1">Contact</td>
        <td width="380" height="33" bgcolor="#FBF1F1"><?php echo $post_contact; ?></td>
      </tr>
	  
      <tr>
        <td width="37" >&nbsp;</td>
        <td width="215" height="33">Phone</td>
        <td width="380" height="33"><?php echo $post_phone; ?></td>
      </tr>
	  
      <tr>
        <td width="37" bgcolor="#FBF1F1">&nbsp;</td>
        <td width="215" height="33" bgcolor="#FBF1F1">Email</td>
        <td width="380" height="33" bgcolor="#FBF1F1"><?php echo $post_email; ?></td>
      </tr>
      
      <tr>
        <td width="37" >&nbsp;</td>
        <td width="215" height="33">Posted By</td>
        <td width="380" height="33"><?php echo $posted_by; ?></td>
      </tr>

       <tr>
        <td width="37" bgcolor="#FBF1F1">&nbsp;</td>
        <td width="215" height="33" bgcolor="#FBF1F1">Post Date</td>
        <td width="380" height="33" bgcolor="#FBF1F1"><?php echo $post_date; ?></td>
      </tr>
      
	  
	 
     <tr>
	 	<td>&nbsp;</td>
        <td height="98" colspan="2"><a href="index.php?classified">Back To List</a></td>
     </tr>
    </table></td>
  </tr>
</table>
